package com.ruoyi.quartz.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.quartz.dao.BaseJobDao;
import com.ruoyi.quartz.domain.JobInfoConfig;
import com.ruoyi.quartz.domain.JobLogDTO;
import com.ruoyi.quartz.service.BaseJobService;


/**
 * BaseJob服务类
 * @author: xubing
 * @createDate: [2019/3/4 16:33]
 * @Version 1.0
 */
@Service
public class BaseJobServiceImpl implements BaseJobService {

	@Autowired
	private BaseJobDao baseJobDao;
	
	@Override
	public void updateJobConfigById(Map<String, Object> updateMap) {
		baseJobDao.updateJobConfigById(updateMap);
	}

	@Override
	public String checkInstanceConfig(Map<String, String> paramMap) {
		return baseJobDao.checkInstanceConfig(paramMap);
	}

	@Override
	public List<JobInfoConfig> getJobConfig(Map<String, String> paramMap) {
		return baseJobDao.getJobConfig(paramMap);
	}

	@Override
	public Long lockJobConfig(String jobName) {
		return baseJobDao.lockJobConfig(jobName);
	}

	@Override
	public void updateJobLogByIdlogDTO(JobLogDTO logDTO) {
		baseJobDao.updateJobLogByIdlogDTO(logDTO);
	}

	@Override
	public Long insertJobLog(JobLogDTO logDTO) {
		return baseJobDao.insertJobLog(logDTO);
	}

	@Override
	public String getCronTime(Map<String, String> params) {
		return baseJobDao.getCronTime(params);
	}

	@Override
	public int updateJobRunningStatus(Map<String, String> paramMap) {
		return baseJobDao.updateJobRunningStatus(paramMap);
	}

	@Override
	public boolean judgePreviousJobStatus(String jobName) {
		return baseJobDao.judgePreviousJobStatus(jobName);
	}

	@Override
	public Long getJobLimitOne(Map<String, Object> updateMap) {
		return baseJobDao.getJobLimitOne(updateMap);
	}

	@Override
	public List<JobInfoConfig> selectJobList(JobInfoConfig job) {
		return baseJobDao.selectJobList(job);
	}
	
	
}
    
